#ifndef HIFUNCTIONS_H
#define HIFUNCTIONS_H
#include <string>
#include <iostream>
using namespace std;

string get_app_path();
bool is_file_exits(const char* path);
void mkdirs(const char *muldir);
string get_format_time();

void get_disk_space_info(char* dir, unsigned long& total_space, unsigned long& free_space, unsigned long& available_space);
int get_disk_free_mb(char *dir);
int get_disk_total_mb(char *dir);
bool have_enough_freespace(char* dir);
bool check_disk_space(char* dir, unsigned int reserved_space_mb);
void confirm_enough_freespace(char* dir);
string get_app_path();
bool remove_dir(string dirName);

int proc_shell_cmd(char* cmd, char result[]);
int get_cpu_info(char* path, char *name, char infor[]);
int get_uboot_info(char uboot_info[]);

unsigned char to_hex(unsigned char x);
string http_url_encode(const string& str);
#endif // HIFUNCTIONS_H
